package com.spj.service.impl;

import com.spj.dao.UserDao;
import com.spj.entity.User;
import com.spj.service.UserServiceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author :spj
 * @Date:2022/4/5
 * @description:
 */
@Service
public class UserServiceImpl implements UserServiceDao {
    @Autowired
    private UserDao dao;

    @Override
    public User checkUser(User user) {
        User userByAP = dao.findUserByAP(user);
        return userByAP;
    }

    @Override
    public User checkUserName(User user) {
        User userByName=dao.findUserByAccount(user);
        return userByName;
    }

    @Override
    public void registUser(User user) {
        dao.insertUser(user);
    }
}
